import axios from "../utils/axios";

// 获取股票周信息
export function getWeekData(stock) {
    return axios.get('/week/'+stock)
}

export function getStocks() {
    return axios.get('/week/stocks')
}

export function getLowStaData() {
    return axios.get('/week/lowSta')
}

// 周涨跌统计
export function getWeekPctStat(week) {
    if (week) {
        return axios.get('/week/weekPctStat/' + week)
    } else {
        return axios.get('/week/weekPctStat')
    }
}

export function getWeekMeanGT(week) {
    if (week) {
        return axios.get('/week/meanGt?date=' + week)
    } else {
        return axios.get('/week/meanGt')
    }
}

export function getIndustryData(industry) {
    return axios.get('/week/industry/'+industry)
}

export function getMultiWeekData(stocks, count = 200) {
    return axios.get('/week/multiStock?stocks='+stocks + '&count=' + count)
}

export function getWeekPctMostDecrease() {
    return axios.get('/week/mostDe')
}

export function getWeekMostPctSum() {
    return axios.get('/week/mostPctSum')
}


export function getWeekConsecutiveDataByStock(stock) {
    return axios.get('/week/consecutive/' + stock)
}